<template>
  <div id="app">
    <Topbar></Topbar>
    <Header></Header>
    <router-view />
    <Footer></Footer>

    <Login v-show="isShowLoginModal"></Login>
    <transition name="fade">
      <Toast v-show="isShowToast"></Toast>
    </transition>
  </div>
</template>

<script>
import Topbar from "./components/Topbar.vue";
import Header from "./components/Header.vue";
import Footer from "./components/Footer.vue";
import Login from "./components/Login.vue";
import Toast from "./components/Toast.vue";
import {mapState} from "vuex";
export default {
  data(){
    return{
      topBarKeyValue:1
    }
  },
  watch:{
  },
  computed:{
    ...mapState({
      isShowLoginModal:state=>state.ShowLoginModal.isShowLoginModal,
      isShowToast:state=>state.toastStatus.isShowToast
    })
  },
  components: {
    Topbar,
    Footer,
    Header,
    Login,
    Toast,
  }
}
</script>

<style lang="less" scoped>
.fade-enter,.fade-leave-to{
  opacity: 0;
}
.fade-enter-active,.fade-leave-active{
   transition:opacity .8s;
}
.fade-enter-to, .fade-leave{
opacity: 1;
}
</style>